package com.mycompany;

import java.awt.Button;
import java.util.Date;

import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

import com.mycompany.panels.DateChooserPanel;





/**
 * Homepage
 */
public class HomePage extends WebPage {

	private static final long serialVersionUID = 1L;

	// TODO Add any page properties or variables here

    /**
	 * Constructor that is invoked when page is invoked without a session.
	 * 
	 * @param parameters
	 *            Page parameters
	 */
	
	IModel m;
	DateChooserPanel dcp;
    public HomePage(final PageParameters parameters) 
    {

        
     
        dcp= new com.mycompany.panels.DateChooserPanel(this,"h",new Model(new Date()));
        add(dcp);
        m = dcp.getDefaultModel();
     Form f = new Form("f");
        
        org.apache.wicket.markup.html.form.Button b = new org.apache.wicket.markup.html.form.Button("btn"){

			@Override
			public void onSubmit()
			{
				m = dcp.getDefaultModel();
				super.onSubmit();
			}


			
        	
        	
        	
        };

        f.add(b);
        add(f);
        
    }
}
